[mirrors]
http://www.tcpdump.org/release/libpcap-1.6.1.tar.gz
http://www.uk.tcpdump.org/release/libpcap-1.6.1.tar.gz
http://tcpdump.cybermirror.org/release/libpcap-1.6.1.tar.gz

[vars]
filesize=651061
sha512=721f20ccf93d0a033945a8ed618dad2aeb7334eea26ee128f2eebf65e19bd6523698191e59e727adb83b96f4ca45f2f218f9af94af9923453c06a57cab36487b

[deps]
libnl-tiny

[deps.host]
flex
bison

[build]
[ -n "$CROSS_COMPILE" ] && \
xconfflags="--host=$($CC -dumpmachine|sed 's/musl/gnu/') --with-pcap=linux"

# package causes gcc breakage when lto is used
if [ x$A = xmips ] ; then
  optldflags=$(printf "%s" "$optldflags"|sed 's/-flto//g')
  optcflags=$(printf "%s" "$optcflags"|sed 's/-flto//g')
fi
CFLAGS="-D_GNU_SOURCE -D_BSD_SOURCE -DIPPROTO_HOPOPTS=0 \
-I$butch_root_dir$butch_prefix/include/libnl-tiny $optcflags" \
LDFLAGS="$optldflags" \
  ./configure -C --prefix="$butch_prefix" \
  --disable-canusb \
  ac_cv_type_u_int64_t=yes $xconfflags
sed -i 's@-lnl-genl@-lnl-tiny@' Makefile
make -j$MAKE_THREADS AR="$CROSS_COMPILE"ar RANLIB="$CROSS_COMPILE"ranlib
make DESTDIR="$butch_install_dir" AR="$CROSS_COMPILE"ar \
     RANLIB="$CROSS_COMPILE"ranlib install
